home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
010a
/
dskrw232.zip
/
DISKRW.DOC
next >
Wrap
Text File
|
1991-11-06
|
31KB
|
883 lines
D i s k - R W
═════════════
Disk Read/Write
(c) Copyright 1989-1991
by Klaus Hartnegg
D-7835 Teningen, Germany
(current with version 2.32)
Contents
1 Introduction 3
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Features . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Shareware . . . . . . . . . . . . . . . . . . . . . . 4
2 Usage 5
2.1 Installation . . . . . . . . . . . . . . . . . . . . . 5
2.2 Syntax . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Options . . . . . . . . . . . . . . . . . . . . . . . 6
1
2.5 Sample batch files . . . . . . . . . . . . . . . . . . 9
3 Technical Notes 9
3.1 Default Options . . . . . . . . . . . . . . . . . . . 9
3.2 Compatibility . . . . . . . . . . . . . . . . . . . . 9
3.3 Using the /Relaxed-option . . . . . . . . . . . . . .10
3.4 A note for Unix users . . . . . . . . . . . . . . . .10
4 Sector Shift 10
4.1 Introduction . . . . . . . . . . . . . . . . . . . . .10
4.2 Description . . . . . . . . . . . . . . . . . . . . .11
4.3 Notes . . . . . . . . . . . . . . . . . . . . . . . .12
5 General Information 12
5.1 Revision History . . . . . . . . . . . . . . . . . . .12
5.2 Known Bugs . . . . . . . . . . . . . . . . . . . . . .13
5.3 Future Plans . . . . . . . . . . . . . . . . . . . . .14
5.4 Included Files . . . . . . . . . . . . . . . . . . . .14
6 Legal Stuff . . . . . . . . . . . . . . . . . . . . . . . .14
6.1 License . . . . . . . . . . . . . . . . . . . . . . .14
6.2 Registering . . . . . . . . . . . . . . . . . . . . .15
2
1 Introduction
Important: if you were already using an old version of DiskRW then
please do at least read section 5.1 "Revision History" on page 12!
Just lately the meanings of two options have changed significantly...
1.1 Overview
DiskRW reads a complete floppy disk, creating an image of its contents
in a file and writes such image files back to floppy disks. It uses a
special trick to achieve maximum speed even on slow computers. DiskRW
can read or write 1.2MB disks in only 30 seconds! There are options to
format the destination disk(s) always or only if needed.
Two sample batch files are included that automate the process of using
DiskRW as a disk copy program, see section 2.5 "sample batch files" on
page 9 for a description of these.
A disk image is a binary representation of the contents of all sectors
of a disk including the boot sector, the file allocation table, all
directories and all files.
A disk created with DiskRW from an image file will thus be an exact copy
of the original disk just like the copies that DOS's DISKCOPY program
creates.
1.2 Features
- FAST !!
bypassing DOS file system, using special sector shift, time critical
part written with Turbo Pascal's integrated assembler
- copy disks of any size with inserting source and destination disk
only once
- create multiple copies with inserting the source disk only once
- flexible: can handle any size disks. Works also perfectly with disk
drives installed with a device=driver.sys statement
- send disks via network/modem. The receiver of the image file can
create exact copies of the original disks
- store (backup) images of several disks on one larger capacity disk
or on hard disk, tape, cartridge, etc. You can even compress the
disk images with you favorite compressor program before storing them
thus saving a lot of disks.
3
- copy smaller capacity disks onto larger ones without reformatting
- for computers with only 3.5" disk drives: copy any 5.25" disk to a
larger capacity 3.5" disk. The result will be an exact 1:1 copy, no
program can tell the difference (except possible by precise access
time measurements)
- will work with disks of ANY size, including but not restricted to
360k, 720k, 1200k, 1440k and even the new 2880k disks! DiskRW will
also properly handle disks with special formats such as 5.25" 720k
disks or ones with 10, 16 or 19 sectors per track.
- will also work on disk drives installed with driver.sys and will
even run equally fast on such drives as on all other ones.
- tested on a wide variety of computers, disk drives and DOS versions
You can get this all for only 40 DM (approx. US $25)!
The unregistered version is of course fully functional except it will
sometimes display a registration reminder before start or after end of
operation. By the way: there is no magic involved in the fact that this
reminder does only appear from time to time, I'm simply using a random
number generator for this!
The registered version does of course not contain any annoying reminders.
1.3 Shareware
Shareware is a distribution method, not a type of software. The
Shareware system makes fitting your needs easier, because you can try
before you buy. And because the overhead is low, prices are low also.
Shareware has the ultimate money-back guarantee - if you don't use the
product, you don't pay for it.
Copyright laws apply to both Shareware and commercial software, and the
copyright holder retains all rights, with a few specific exceptions as
stated below. Shareware authors are accomplished programmers, just like
commercial authors, and the programs are of comparable quality (In both
cases, there are good programs and bad ones!). The main difference is in
the method of distribution. The author specifically grants the right to
copy and distribute the software.
Shareware distribution gives users a chance to try software before
buying it. If you try a Shareware program and continue using it, you are
expected to register.
The shareware system and the continued availability of quality shareware
products depend on YOUR willingness to register and pay for the software
4
that you use. It's the registration fees YOU pay which allows to support
and continue to develop such products!
Show your support for shareware by registering those programs you
actually use. Shareware is kept alive by YOUR support!
2 Usage
2.1 Installation
It is not absolutely necessary to install DiskRW before usage. However
as long as you don't install it, it will not reach full speed!
During installation DiskRW will determine the type of the disk drive,
the disk parameters (size, number of tracks, sides and sectors) and the
optimum sector shift parameters for this drive and disk. It will save
these parameters in a configuration file (DISKRW.CFG). Whenever you ask
it to read or write a disk it will look up the optimum shift parameters
in this configuration file.
If DiskRW can not find the configuration file, it will set both shift
parameters to 0. It will work with these parameters and still produce
correct disk copies but it will run much slower.
Installing DiskRW is easy: just call it with the /i (=install) option
once for every disk drive and disk type that you are using. Example: if
you have two disk drives, A: and B: and are using 360k and 1.2MB disks
in drive A: and 720k disks in drive B: then you have to issue the
command DISKRW /i A: two times and DISKRW /i B: once. If you are asked
to insert the disk, insert once a formatted 360k and once a 1.2M disk
into drive A: and a formatted 720k disk into drive B:.
It is not important in which order you install the disk drives or in
which order you install the different disk sizes. You can also install
additional disk drives or disk types or re-install already installed
ones at any time. If you forgot which ones are already installed just
TYPE the configuration file DISKRW.CFG. You can find a description of
the contents of this file and a table with a few sample values in the
second half of section 4.2 on page 11.
During installation DiskRW will read the complete disk several (three or
four) times. The first and last run can be aborted by pressing the
ESC-key. This will save some time and will not have a negative effect on
the parameter determination but then you will not know how much faster
5
DiskRW runs with the optimum parmeters in comparison with using the
default parameters.
The two time values displayed during installation should vary between 6
and 9. If you get much higher numbers, try installing again with the
/q-option. If this results in less total time for the last run and lower
shift parameters, you will have to use this option always in order to get
maximum speed. Section 3.1 on page 9 describes how you can make this a
default option.
Make sure that you do not have a multitasker running such as Quarterdecks
DESQview or Microsofts Windows when installing DiskRW since it will then
determine (and save!) wrong parameters. Also do not press the pause key
or pop up any TSR programs while the initializing process is running. You
can abort by pressing Ctrl-C or Break.
2.2 Syntax
Syntax : DiskRW [options] source [destination]
To read a disk to a file specify the disk drive as source and the
filename as destination.
For writing an image file to a disk specify the filename as source and
the disk drive as destination.
The next version will also accept disk drives both as source and
destination and will in this case automatically use a temporary image
file or extended/expanded memory.
2.3 Examples
DiskRW A: C:\Temp\floppy.dsk (read disk to image file)
DiskRW C:\Temp\floppy.dsk A: (write image file back to disk)
DiskRW /i A: (install DiskRW for the disk in A:)
2.4 Options
Options can be specified anywhere on the command line: before, after or
in between the arguments. They are not case sensitive. Each option has to
be preceded by the switch character (usually '/', but you can change
this, see section 3.4 on page 10).
6
List of all options:
F: Format and verify destination before writing
format each track before writing and then verify whether the data is
readable without errors.
A: Autoform, format only if necessary
DiskRW will automatically switch to format mode if it detects an disk
error while writing.
Even if you do not specify this option you will also have the choice
to switch to format mode: If DiskRW detects an write error it will
ask you whether you want to A)bort R)etry I)gnore or F)ormat.
O: Overwrite without warning
Usually \DiskRW\ will beep and ask for permission to overwrite
non-empty disks and already existing files.
If you use the O-option, DiskRW will overwrite already existing data
without warning. WARNING: Use this option with great care!!!
R: Relaxed size test (write only)
Specify this option if you want to write an image file to a disk that
was formatted to a different capacity.
This allows you for example to write the image of a 360k disk to a
3.5" 720k disk for use on a system with only 3.5" disk drives.
You can also write the image of a disk with the old (larger) size
back to such a (now smaller) disk sometime later.
It will of course not work if the image file is larger than the disk
and the disk has never before been formatted to the same higher
capacity. In this case the disks needs to be formatted.
C: Compare mode (NOT YET IMPLEMENTED)
This will cause DiskRW not to copy but to compare the specified disk
and image file. You can expect DiskRW to contain this option in the
very near future since I am already working on it.
Nx: set number of copies (NOT YET IMPLEMENTED)
For use together with the (also not yet implemented) copy mode.
I: Installation
When using the init mode specify only one disk drive and enter a
formatted disk into this drive. DiskRW will determine the disk drive
type and the disk capacity and store this info in its configuration
file DISKRW.CFG.
7
DiskRW will also determine the optimum sector shift parameters and
store them too. Whenever it will later process a disk with the same
capacity in the same disk drive it will use the stored sector shift
parameters for maximum speed.
B: use Bios for screen output
Use this option on not 100% compatible computers if you otherwise
can not see the screen output. Usually DiskRW writes directly to
the memory of the video card since this is much faster.
Possible problem: Bios screen output is much slower and accessing
the disk in the way DiskRW does this is very time critical. Even a
small additional delay may cause an enormous slow down of DiskRW.
If this happens you should also use the /Quiet switch.
Q: Quiet, no screen output while copying
If you have a slow computer or are using the /B (=Bios) option, you
should try whether DiskRW runs faster if you specify this option.
E: English screen output
this is the default, but read also the description of the D-option
below
D: German screen output
DiskRW will automatically switch to German screen output if you
have set the country code to 49 with the line country=49 in your
CONFIG.SYS-file.
The next version of DiskRW will also come with German documentation
(in addition to, not instead of the english one!)
Pn=x: set shift parameter n to x (n=1 or 2)
Usually DiskRW will read the sector shift parameters from its
configuration file DISKRW.CFG. However if you want to use other
sector shift parameters just for a few disks without modifying the
configuration file, you can specify them with this option.
Example: /p1=1 /p2=3
T: set number of tracks
Usually DiskRW will determine the number of tracks to copy by
reading these numbers from the disks boot sector. With this option
you can force DiskRW to process a different number of tracks.
Warning: use this option only if you know precisely what you are
doing since it can make a disk unusable to write only the first few
tracks.
8
S: set number of sectors
Same as /t except it affects the number of sectors instead the number
of tracks. Same warning applies here too.
2.5 Sample batch files
I have included two sample batch files to automate two common
applications of DiskRW:
DiskRW1 will create one copy each of one or more source disks
Syntax: DiskRW1 [options] source destination
Example: DiskRW1 A: B:
DiskRW2 will create multiple copies of one source disk
Syntax: DiskRW2 [options] drive
Example: DiskRW2 B:
All specified options will be passed to DiskRW. Make sure that the file
DISKRW.EXE can be found either in the current directory or in one listed
in your path variable (please read a DOS manual if it doesn't work and
you don't know what the path variable is).
3 Technical Notes
3.1 Default Options
You can specify default options to be used automatically every time you
execute DiskRW. Write them into a file with the name DISKRW.OPT and place
this file either in the current directory or in the same directory as
DISKRW.EXE.
In this file the options must not be preceded by the switch character
('/' or '-') but they have to be separated by each other with blanks.
3.2 Compatibility
DiskRW can read and write any type of floppy disks including but not
restricted to the most common ones: 360 kByte, 720 kByte, 1.2 MByte, 1.44
MByte and even the brand new 2.88 MByte disks.
However formatting such non-standard disks will not yet work.
9
3.3 Using the /Relaxed-option
Writing the image of disk with larger capacity to a smaller one will only
work if the disk was once formatted to higher capacity but then the image
of a smaller disk was written onto it.
Writing the image of a smaller disk to a larger one should always work.
However: capacity is not the really important item. The destination disk
has to be formatted with the same or higher number of tracks, sectors and
sides and the number of bytes per sector.
3.4 A note for Unix users
This program will usually accept both
a) '/' and '-' as switch character (to start an option)
b) '\' and '/' as path separator
But: you can not start a filename with '/'.
However if you have your switch character variable set to a different
value than the default (the default is '/', changing it is not possible
any more with Dos 5) then
a) your value OR '-' can be used as switch character (or only '-' if
this is your value)
b) filenames are allowed to start with '/'
4 Sector Shift
4.1 Introduction
Data on Disks is stored in radial cylinders, each divided into several
sectors.
After one track is completely read or written it is a good idea not to
start reading the next track with the very first sector because moving to
the next track needs some time. During this time the first sector of this
track has usually just passed the read write head of the disk drive.
10
4.2 Description
One can speed up reading and writing very much if one starts reading
always with a different sector on the next track than one did on the
previous one. How many sectors need to be skipped depends on the speed of
the computer, the disk controller, the disk drive and the disk type
(capacity).
Actually the whole thing is a bit more complicated because both sides of
a disk are used, thus there are two tracks on every cylinder: one on the
upper and one on the lower side of the diskette. Only every second track
change will also cause a cylinder change but on every track change the
disk drive has to toggle one read/write head on and the other one off.
One could think that only switching to the other head should cause no
delay as does moving the head. But surprisingly this delay is also quite
noticeable.
This means that if one wants to read or write a whole disk as fast as
possible, one has to use two different sector shift parameters.
Since different disk types have a different number of sectors per track
and different disk drives have different speed too, one has to determine
the two parameters for all possible combination of disk drive and disk
type.
DiskRW will determine the optimum value for these two parameters for
every disk during installation and save them in a configuration file.
When reading or writing a disk it will then always know which sector
shift parameters are the best ones.
The configuration file is a plain text file. It contains one line for
every different drive/disk combination. In the first column stands the
drive character ("A", "B" etc.), in the second one a number describing
the drive type, then comes the disk capacity and finally the two sector
shift parameters. The first parameter is for disk head changes, the
second one for disk track changes.
Drive type 1 stands for 5.25" disks, 7 for 3.5" ones. Don't blame me for
this, it was Microsoft's Idea. The disk capacity is given in kilobytes.
Here come a few samples taken from the configuration file on my computer
11
(80386, 25 MHz, slow disk controller):
drive- │drive- │ disk │shift-
name │ type │capacity │param.
───────┼───────┼─────────┼──┬──
A │ 1 │ 360 │1 │ 2
A │ 1 │ 1200 │1 │ 3
B │ 7 │ 720 │1 │ 2
B │ 7 │ 1440 │1 │ 3
4.3 Notes
Be sure not to have a disk cache installed that also caches floppy access
when you really want maximum speed or disable it. Also if possible do not
run DiskRW in a multitasking environment such as DESQview or Windows.
DiskRW will of course work under such conditions but it will be much
slower.
Determining the optimal shift parameters will not work in a multitasker.
Recently I noticed that there are a few disk controllers (surprisingly
very old ones) that will also achieve the maximum possible speed without
such tricks. Also there is a special disk formatting program that will do
similar things. If you are using such a computer or formatter then you
will have to set both sector shift parameters to 0 to achieve maximum
speed. In this case simply don't use a configuration file and DiskRW will
always set both parameters to 0.
5 General Information
5.1 Revision History
1.2 translated program and documentation to english
1.3 /r option for disks with different capacity than disk image
1.4
- speed increase by factor of 1.5-2 by using different DOS interrupts
- Break and Ctrl-C detection
2.0 (29-July-1991)
- The two programs DiskRead and DiskWrite are now combined in one
executable DiskRW that is only slightly larger than the old
DiskWrite
12
- will now also work on disk drives installed via device=driver.sys
even with same speed as on other drives!
2.1 (8-Aug-1991)
- several more error traps
- user has now the choice to abort or retry on disk errors
- better Ctrl-Break handler, previous one flushed keyboard buffer
- bypassing bios for screen output for higher speed on slow computers
- added switches Bios and Quiet for compatibility
- circumventing a bug of MS-DOS that causes a delay when the data
buffer passes a 64k barrier
2.12α (13-Aug-1991)
- using optimized disk access for maximum speed
- further speed increase
- options /s1 and /s2 for sector shift tests
2.2 (5-Sep-1991)
- enormous speed increase by using sector shift
- removed /force switch, use /relax instead
2.3 (11-Okt-1991)
- /Format and /Autoformat options
- read shift parameters from file DISKRW.CFG
- renamed /s to /p (shift parameters)
- options /tracks and /sectors
2.31 (26-Okt-1991)
- forgot to include the sample batch files in previous release
- /q was not handled properly if used together with /i
- included possibility to skip two non vital installation steps by
pressing ESC
2.32 (6-Nov-1991)
- /o (overwrite) option does now also affect overwriting of already
existing image files, not only non-empty disks
- formatting of 5.25" 720k disks possible now
- end of program registration reminder occurred in 2/3 of the runs.
This was not my intention. It's now corrected to 1/10.
5.2 Known Bugs
In the compatibility(?) box of OS/2 the resetting of the destination disk
after writing or when using the /r switch will crash the computer. Tell
me how to detect OS/2 and I will correct this.
This one is not really a bug, but also a restriction: DiskRW will not run
with DOS prior to version 3.0. With versions prior to 3.2 it will run but
it can't tell DOS that the disk has changed after writing. It will notify
you that you have to remove and re-insert the disk before accessing it.
13
5.3 Future Plans
- move all functionality from the sample batch files into the program
itself, i.e. allow specifying a disk both as source and destination
- new option /n=x: set the number of copies
- new option /c: compare image file with disk
- optionally write the image to extended or expanded memory instead to
a disk file
5.4 Included Files
DISKRW .DOC this documentation
DISKRW .EXE executable
DISKRW1 .BAT sample batch: create one copy each of several disks
DISKRW2 .BAT sample batch: create multiple copies of one disk
ORDER .FRM order form
HARTNEGG .LST list of all my shareware programs
6 Legal Stuff
All trademarks mentioned in this document are trademarks or registered
trademarks of their respective companies and are hereby acknowledged.
6.1 License
Users of DiskRW must accept this disclaimer of warranty:
DiskRW is supplied as is. The author disclaims all warranties,
expressed or implied, including, without limitation, the warranties of
merchantability and of fitness for any purpose. The author assumes no
liability for damages, direct or consequential, which may result from
the use of DiskRW.
DiskRW is a "shareware program" and thus not free. It is fully protected
by international copyright laws.
You are free to copy and distribute DiskRW as long as all files belonging
to it are distributed together and are not modified in any way. If
14
possible please distribute the original ZIP archive. Please do not give
it away altered or as part of another system.
The essence of "user-supported" software is to provide personal computer
users with quality software without high prices, and yet to provide
incentive for programmers to continue to develop new products.
If you find this program useful and find that you are using DiskRW and
continue to use DiskRW after a reasonable trial period, then you are both
under legal and moral obligations to make a registration payment to Klaus
Hartnegg Shareware (see separate file ORDER.FRM for a registration form,
VISA card accepted!).
The registration fee will license one copy for use on any one computer at
any one time. You must treat this software just like a book. An example
is that this software may be used by any number of people and may be
freely moved from one computer location to another, so long as there is
no possibility of it being used at one location while it's being used at
another. Just as a book cannot be read by two different persons at the
same time.
You must never give the key-file away (see below). This file is proof of
your registration and contains your name and serial number.
Commercial users of DiskRW must register and pay for their copies of
DiskRW within 30 days of first use or their license is withdrawn.
Site-License arrangements may be made by contacting Klaus Hartnegg
Shareware.
Anyone distributing DiskRW for any kind of remuneration must first
contact Klaus Hartnegg Shareware at the address below for authorization.
This authorization will be automatically granted to distributors
recognized by the (ASP) as adhering to its guidelines for shareware
distributors, and such distributors may begin offering DiskRW immediately
(However Klaus Hartnegg Shareware must still be advised so that the
distributor can be kept up-to-date with the latest version of DiskRW).
You are encouraged to pass a copy of DiskRW along to your friends for
evaluation. Please encourage them to register their copy if they find
that they can use it.
6.2 Registering
To register print the separate file ORDER.FRM, complete it and send it to
my address below.
15
With registration, you get the right to continue using the software, an
updated program with new features, a printed manual and technical support
by mail and e-mail.
The technical support will answer questions and fix serious bugs. For
problems involving a specific hardware or software environment or
feature, I may choose not to modify the program. In that case, if the
problem is reported within three months after purchase, I will refund the
price.
Within one or two weeks you will receive a diskette with
- The current version of this program that may already include some or
all of the features listed above in the section "Future Plans"
- The current versions of all other programs that I distribute as
shareware.
- The key-file(s) for the program(s) that you registered (if any of my
programs finds its corresponding key-file it will not display the
annoying shareware reminder any more).
Please note that the key file system means that you get FREE UPDATE to
ALL future versions since the key-files will not only work for the
present, but also for all future versions of the same program.
---------------------------------------
Klaus Hartnegg Shareware
Kleist-str. 7
D-7835 Teningen
Germany
This software is under development. Error reports and other comments are
welcome. Please do not hesitate to use electronic mail for communication.
(these addresses may be valid only until end of 1992)
Bitnet : hartnegg@dfrruf1
Internet : hartnegg@ibm.ruf.uni-freiburg.de
16